<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>用户管理</title>

<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=UTF-8">

<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->

</head>

<body>

<div class="row">
   <div id="vf_loadRight" class="col-xs-12">
		<div class="widget-body">
			
		</div>
	
		<div class="widget-body  col-xs-12">
			<div id="div_condition_search" class="widget-main row">
			  <div class="col-xs-9 pull-left">
				<input type="text" id="name" name="name" value="${name!}" class="" placeholder="帐号名" />
				<input type="text" id="mobile" name="mobile" value="${mobile!}" class="" placeholder="手机号" />
				<input type="text" id="username" name="username" value="${username!}" class="" placeholder="用户名称" />
				<input type="text" id="address" name="address" value="${address!}" class="" placeholder="用户地址" />
				
				<a id="a_condition_search" href="javascript:void(0);" class="btn btn-sm btn-info" onclick="condition_search('${ctx}/loginUser/getUserList')">
						<i class="glyphicon glyphicon-search"></i> ${langMap['lang.global.common.button.query']}
				</a>
			  </div>	
			  <div class="col-xs-2 pull-right">
				<a href="${ctx}/loginUser/gotoAdd" class="btn btn-sm btn-info pull-right" openMode="rightPage"> 
					<i class="glyphicon glyphicon-plus bigger-110"></i>
					${langMap['lang.global.common.button.add']}
				</a>
			  </div>
			</div>
		</div>
   </div>
</div>
   <br>

   <form id="form_query" action="${ctx}/loginUser/getUserList" method="post">
    
    <!-- 数据列表 -->
	<div class="row">
		<div class="col-xs-12">
		    <!-- 列表标题 -->
			
			
			<!-- 列表开始 -->
			<div class="table-responsive">
				<table id="wew" name="wew" class="table table-striped table-bordered table-hover full-left">
				   <thead>
					   <tr>
					        <#list headMap.keySet() as mkey>
						   		<th>${headMap.get(mkey)}</th>
					   	    </#list>
					   	    <th>${langMap['lang.global.common.table.operate']}</th>
					   </tr>
				   </thead>
				   <tbody>
					   <#list pageObj.list as obj>
						   <tr id="ttttextrrrr_${obj['id']}">
							   <#list headMap.keySet() as mkey>
							        <#if mkey=='status'>
							        	<#if obj['status']==0>
							        		<td class="col-xs-${(10/headMap.size())?int}"></span> 正常</td>
							        	<#else>
							        		<td class="col-xs-${(10/headMap.size())?int}"><font color="red">锁定</font></td>
							        	</#if>
							        <#elseif mkey=='manager'>
							        	<#if obj['manager']=="1">
							        		<td class="col-xs-${(10/headMap.size())?int}"><span class="orange"><i class="glyphicon glyphicon-user"></i></span> 管理员</td>
							        	<#else>
							        		<td class="col-xs-${(10/headMap.size())?int}">普通用户</td>
							        	</#if>
				   			    	<#else>
				   			    		<#if (obj[mkey]!)?length lt 20>   
											<td class="col-xs-${(10/headMap.size())?int}">${obj[mkey]!}</td>
										<#else> 
										     <td class="col-xs-${(10/headMap.size())?int}" title="${obj[mkey]}">${obj[mkey][0..21]}...</td>
										</#if>
					   			    </#if>
					   	 	   </#list>
					   	 	   
					   	 	   <td class="col-xs-2">
									<div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
										<a id="mas_${obj.id!}" class="green" href="${ctx}/loginUser/gotoUpdate/${obj.id!}" openMode="rightPage" title="修改">
											<i class="glyphicon glyphicon-pencil bigger-130" ></i>
										</a>
										<a id="mas_list_del" class="red" href="javascript:void(0);" title="删除" onclick="if(confirm('您确认要删除吗？', function() { }, null))ajaxRefresh('${ctx}/loginUser/delete/${obj.id!}','${ctx}/loginUser/getUserList');">
											<i class="glyphicon glyphicon-trash bigger-130" ></i>
										</a>
										<#if (obj['status']!)==0>
											<a id="mas_a" class="red" href="javascript:void(0);" title="锁定" onclick="ajaxRefresh('${ctx}/loginUser/updateLock/${obj.id!}','${ctx}/loginUser/getUserList');">
												<i class="glyphicon glyphicon-lock bigger-130" ></i>
											</a>
										<#else>
											<a id="mas_b" class="red" href="javascript:void(0);"  title="解锁" onclick="ajaxRefresh('${ctx}/loginUser/updateUnLock/${obj.id!}','${ctx}/loginUser/getUserList');">
												<i class="glyphicon glyphicon-lock bigger-130" ></i>
											</a>
										</#if>
										
									</div>
								</td>
					   	 	   
						   </tr>
					   </#list>
				   </tbody>
				</table>
			</div>
			<!-- 列表结束 -->
			
			<div class="modal-footer no-margin-top ">
			    <!-- 按钮 位置 待用 -->
				 
				<!-- 分页标签 -->
		        <div class="col-xs-6">
			        <ul class="pull-right" id="table_pageNum" currentPage="${pageObj.pageNumber}" sizePage="${pageObj.pageSize}" totalPages="${pageObj.totalPage}" totalRows="${pageObj.totalRow}"></ul>
		        </div>
			</div>
		</div>
	</div>
	
  </form>

</body>
<script type="text/javascript">
	$("#span_menuTwoLevel").html("用户管理");
</script>
</html>
